package com.turbo.cloud.ums.web.model.role;

import com.turbo.cloud.core.base.BaseModel;
import com.turbo.cloud.core.validated.InsertValidated;
import com.turbo.cloud.core.validated.UpdateValidated;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 用户权限表
 * </p>
 *
 * @author zhangluning
 * @since 2022-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Accessors(chain = true)
public class UmsRoleDo extends BaseModel {

    /**
     * 主键
     */
    @NotBlank(message = "角色ID不能为空", groups = {UpdateValidated.class})
    private String id;

    /**
     * 系统Id
     */
    private String systemId;

    /**
     * 角色名称
     */
    @NotBlank(message = "角色名称不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private String roleName;
    private String roleNameByLike;

    /**
     * 角色编码
     */
    @NotBlank(message = "角色编码不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private String roleCode;
    private String roleCodeByLike;

    /**
     * 描述
     */
    private String note;

    /**
     * 排序
     */
    @NotNull(message = "角色排序不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private Integer sort;

    /**
     * 权限ID集合
     */
    private List<String> permissionIds;
}
